<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>


<table id="myTable"  class="tablesorter" >
    <thead>
        <tr>
            <th>Nom Pr&eacute;nom</th>
            <th>Adresse</th>
            <th>T&eacutel&eacute;phone</th>
            <th>Mobile</th>
            <th>Employ&eacute;s</th>
        </tr>
    </thead>



    <tbody>
        <c:forEach var="adherent" items="${listAdherent}" varStatus="vs">
            <tr >
                <td><a href="/adherent/show.do?id=${adherent.id}">${adherent.nomPrenom}</a></td>

                <td>${adherent.adresse}<br/>
                    ${adherent.complementAdresse}<br/>
                    ${adherent.codePostal} - ${adherent.ville}
                </td>
                <td>${adherent.telephone}</td>
                <td>${adherent.mobile}</td>
                <td>
                    <c:forEach var="contrat" items="${adherent.contrats}" varStatus="vs">
                        <a href="/contrat/show.do?id=${contrat.id}">${contrat.employe.nom} - ${contrat.employe.prenom}</a><br/>

                    </c:forEach>


                </td>
            </tr>
        </c:forEach>

    </tbody>
</table>
<div id="pager" class="pager">
    <form>
        <img src="/img/first.png" class="first">
        <img src="/img/prev.png" class="prev">
        <input type="text" class="pagedisplay">
        <img src="/img/next.png" class="next">
        <img src="/img/last.png" class="last">
        <select class="pagesize">
            <option selected="selected" value="10">10</option>
            <option value="20">20</option>
            <option value="30">30</option>
            <option value="40">40</option>
        </select>
    </form>
</div>



<div class="submit-container" style=" clear: left;">

    <a href="/adherent/index.do" class="submit-button">Revenir &agrave; l'acceuil</a>
</div>


<script>
    $(function() {

         $("table").tablesorter({ widgets: ['zebra']}).tablesorterPager({container: $("#pager")}); 

    });

</script>